package 网络编程;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;

public class Send {

	public static void main(String[] args) throws IOException {
		DatagramSocket ds = new DatagramSocket(8888);
		byte[] buf = "你好, 我来啦".getBytes("utf-8");
		DatagramPacket dp = new DatagramPacket(buf, buf.length,InetAddress.getByName("127.0.0.1"),10000);
		ds.send(dp);
		ds.close();
	}
}
